<?php

namespace App\Controller\InsideService;

class TaskInside extends BaseInside {
    /**
     * 获取配置列表
     * @param string $size
     * @param string $game_hash
     * @param int $page
     * @return array
     */
    public function index(string $size = '', string $game_hash = '', int $page = 1): array {
        return $this->getInfo('Task/index', [
            'page'      => $page,
            'size'      => $size,
            'game_hash' => $game_hash
        ]);
    }

    public function add($data): mixed {
        return $this->postInfo('Task/add', $data);
    }

    public function del($id): mixed {
        return $this->getInfo('Task/del', [
            'id' => $id
        ]);
    }

    public function getMessage($game_hash): mixed {
        return $this->getInfo('Task/getMessage', [
            'game_hash' => $game_hash
        ]);
    }
}